// JavaScript Document
  var isIe=(document.all)?true:false;  //判断浏览器是否为IE
  //设置select的可见状态
  function setSelectState(state)
  {
    var objl=document.getElementsByTagName('select');  //防止弹出窗口被select下拉菜单屏蔽
    for(var i=0;i<objl.length;i++)
    { 
      objl[i].style.visibility=state;
    }
  }
  
function mousePosition(ev)
  {
    if(ev.pageX || ev.pageY)
    {
      return {x:ev.pageX, y:ev.pageY-self.pageYOffset};  //这里作了对firFox的优化
    }
    return {
      x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,y:ev.clientY + document.body.scrollTop - document.body.clientTop
    };
  }
//弹出方法
function showMessageBox(wTitle,content,pos,wWidth)
  {
    closeWindow();
    var bWidth=parseInt(document.documentElement.scrollWidth);
    var bHeight=parseInt(document.documentElement.scrollHeight);
    var hHeight=parseInt(document.documentElement.scrollTop);  //加入scrollTop定位滚动的距离，以准确定位div的位置
    if(isIe){
      setSelectState('hidden');
    }  //禁止下拉框的活动
    var back=document.createElement("div");  //创建一个背景层
    back.id="back";
    var styleStr="top:0px;left:0px;position:absolute;background:#666;width:"+bWidth+"px;height:"+bHeight+"px;";
    styleStr+=(isIe)?"filter:alpha(opacity=0);":"opacity:0;";
	back.innerHTML="<div class='back' style='"+styleStr+"' onClick='javascript:closeWindow();'>"; 
    back.style.cssText=styleStr;
    document.body.appendChild(back);
    showBackground(back,10);
    var mesW=document.createElement("div");
    mesW.id="mesWindow";
    mesW.className="mesWindow";
    mesW.innerHTML="<div style='background:#e0edff;'><table width='100%' height='100%'><tr><td style='width:76%;float:left;'>"+wTitle+"</td><td style='width:24%;float:right'></td><td style='width:1px;'><a href='#none' onclick='closeWindow();' title='关闭窗口' class='close' value='关闭' hidefocus='true' /><img src='../../../../../../cn/templets/images/small/009.gif' alt='关闭' /></a></td></tr></table></div><div class='mesWindowContent' id='mesWindowContent'>"+content+"</div><div class='mesWindowBottom'></div>";  //标题style
styleStr="left:"+(((pos.x-wWidth)>0)?(pos.x-wWidth)+120:pos.x)+"px;top:"+((((pos.y+hHeight)+300-bHeight)>0)?(pos.y+hHeight-300):(pos.y+hHeight+10))+"px;position:absolute;width:"+wWidth+"px;border:3px solid #b1c5fe;";  //准确判断和定位Msg层的位置  
    mesW.style.cssText=styleStr;
    document.body.appendChild(mesW);
  }
//让背景渐渐变暗
function showBackground(obj,endInt)
  {
    if(isIe)
    {
    obj.filters.alpha.opacity+=50;
    if(obj.filters.alpha.opacity<endInt)
      {
      setTimeout(function(){showBackground(obj,endInt)},5);
      }
    }else{
       var al=parseFloat(obj.style.opacity);al+=0.01;
       obj.style.opacity=al;
       if(al<(endInt/100))
       {setTimeout(function(){showBackground(obj,endInt)},5);}
    }
  }
//关闭窗口
function closeWindow()
  {
    if(document.getElementById('back')!=null)
    { 
      document.getElementById('back').parentNode.removeChild(document.getElementById('back'));   //移除背景层	 
	   
    }
    if(document.getElementById('mesWindow')!=null)
      {
      document.getElementById('mesWindow').parentNode.removeChild(document.getElementById('mesWindow'));  //移除Msg层
      }
    if(isIe){
      setSelectState('');
	}
 }
//测试弹出

function testMessageBox(ev)
  {
    var objPos = mousePosition(ev);
    messContent="<div style='text-align:center;width:100%;height:240px; overflow:hidden; background-color:#fff; '><iframe name='myFrame' src='../../../../uc/do2.php?ac=8bbc97e7e896b625a831c89302609ab3' frameborder='0' width='100%' scrolling='auto' height='100%'></iframe></div>";  //这里是框架属性
//8bbc97e7e896b625a831c89302609ab3  网站
//823af6b2b85d5b6d0e0595c374484b02  wu
//d7e988c053a5ada11d6666b378616c2e  xu	
    showMessageBox('快速注册：',messContent,objPos,580);
	
  }
  
